Data Read In

CSLAP<-read.csv("CSLAP_Dataset_09232019.csv", header=TRUE)
CSLAP$Sample_Year<-as.factor(CSLAP$Sample_Year)
CSLAP$Sample_Month<-as.factor(CSLAP$Sample_Month)

#Split by `Info_Type`
OWCSLAP<-CSLAP[CSLAP$Info_Type == "OW",]
BSCSLAP<-CSLAP[CSLAP$Info_Type == "BS",]
SBCSLAP<-CSLAP[CSLAP$Info_Type == "SB",]
noSBCSLAP<-CSLAP[CSLAP$Info_Type != "SB",]

redCSLAP<-read.csv("redCSLAP.csv")

redOWCSLAP<-redCSLAP[redCSLAP$Info_Type == "OW",]
redBSCSLAP<-redCSLAP[redCSLAP$Info_Type == "BS",]
redSBCSLAP<-redCSLAP[redCSLAP$Info_Type == "SB",]
rednoSBCSLAP<-redCSLAP[redCSLAP$Info_Type != "SB",]

Mixed Effects Models for the Global Dataset (n=69)

Open Water Total Phosphorus

Remove troublesome LakeID and Sample_Year

#Select out data of interest
df <- OWCSLAP %>% dplyr::select(TP_mg.L, Dreissenids, CA.SA, Mean_Depth_m, Sample_Year, Sample_Month, LakeID)
df <- df[complete.cases(df), ]

#Remove lakes and year 2015
df <- df[df$LakeID != "0601GUI0188",]
df <- df[df$LakeID != "1201ECA0697", ]
df <- df[df$LakeID != "1701LLO0708", ]
df <- df[df$LakeID != "1201GAL0563", ]
df <- df[df$Sample_Year != "2015",]
df$LakeID <- as.factor(as.character(df$LakeID))

Fit the model

OWTP<-lmer(log(TP_mg.L+.01) ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=df)

summary(OWTP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(TP_mg.L + 0.01) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Year) + (1 | Sample_Month) + (1 | LakeID) + (1 |  
##     Sample_Year:LakeID)
##    Data: df
## 
## REML criterion at convergence: -1376.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4509 -0.5243 -0.1206  0.3339  8.2501 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev.
##  Sample_Year:LakeID (Intercept) 3.534e-03 0.059448
##  LakeID             (Intercept) 2.470e-02 0.157154
##  Sample_Month       (Intercept) 1.454e-05 0.003813
##  Sample_Year        (Intercept) 1.275e-03 0.035706
##  Residual                       2.515e-02 0.158588
## Number of obs: 2114, groups:  
## Sample_Year:LakeID, 272; LakeID, 65; Sample_Month, 6; Sample_Year, 5
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)           -3.767159   0.072209  91.587601 -52.170  < 2e-16 ***
## DreissenidsUninvaded  -0.048822   0.046906 174.969528  -1.041 0.299381    
## log(CA.SA)             0.017846   0.020804  61.360106   0.858 0.394355    
## Mean_Depth_m          -0.018813   0.005418  61.964622  -3.472 0.000947 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.606              
## log(CA.SA)  -0.584  0.046       
## Mean_Dpth_m -0.315  0.004 -0.213

Model diagnostics

plot(OWTP)

qqmath(OWTP)

qqPlot(resid(OWTP))

## 3989  731 
## 1714  272

Bottom Sample Total Phosphorus

-Updated 03/08 boundary (singular) fit removed random effect of Sample_Month (variance =0.00), but then output Model failed to converge warning

-Updated 03/09 Model failed to converge fixed by taking log of mean_depth_m and adding only .01 to log(TP_mg.L) instead of 1

Fit the model

BSTP<-lmer(log(TP_mg.L+.01) ~ Dreissenids + log(CA.SA) + log(Mean_Depth_m)  + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=BSCSLAP)

summary(BSTP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(TP_mg.L + 0.01) ~ Dreissenids + log(CA.SA) + log(Mean_Depth_m) +  
##     (1 | Sample_Month) + (1 | LakeID) + (1 | Sample_Year:LakeID)
##    Data: BSCSLAP
## 
## REML criterion at convergence: 3129.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.4705 -0.4411 -0.0672  0.3574  4.9452 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.088946 0.2982  
##  LakeID             (Intercept) 0.442456 0.6652  
##  Sample_Month       (Intercept) 0.007073 0.0841  
##  Residual                       0.242080 0.4920  
## Number of obs: 1847, groups:  
## Sample_Year:LakeID, 275; LakeID, 55; Sample_Month, 6
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)           -3.04831    0.43720  60.58308  -6.972 2.67e-09 ***
## DreissenidsUninvaded   0.07239    0.20790 140.22374   0.348    0.728    
## log(CA.SA)             0.01917    0.09593  51.17992   0.200    0.842    
## log(Mean_Depth_m)     -0.25814    0.20674  51.50439  -1.249    0.217    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.427              
## log(CA.SA)  -0.316  0.093       
## lg(Mn_Dpt_) -0.727 -0.031 -0.237

Model diagnostics

plot(BSTP)

qqPlot(resid(BSTP))

## 3419   20 
## 1294   10

Open Water Chlorophyll a

Fit the model

Chl<-lmer(log(Extracted_Chl.a_ug.L+1) ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=OWCSLAP)

summary(Chl)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## log(Extracted_Chl.a_ug.L + 1) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Year) + (1 | Sample_Month) + (1 | LakeID) + (1 |  
##     Sample_Year:LakeID)
##    Data: OWCSLAP
## 
## REML criterion at convergence: 3567.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.1081 -0.5666 -0.0430  0.4943  5.5985 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.02531  0.15910 
##  LakeID             (Intercept) 0.08719  0.29527 
##  Sample_Month       (Intercept) 0.01318  0.11481 
##  Sample_Year        (Intercept) 0.00488  0.06986 
##  Residual                       0.19212  0.43831 
## Number of obs: 2637, groups:  
## Sample_Year:LakeID, 348; LakeID, 69; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            1.386082   0.152233  86.432436   9.105 2.89e-14 ***
## DreissenidsUninvaded   0.001903   0.102020 124.230242   0.019   0.9851    
## log(CA.SA)             0.052303   0.039062  62.060302   1.339   0.1855    
## Mean_Depth_m          -0.034230   0.010244  63.502408  -3.341   0.0014 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.635              
## log(CA.SA)  -0.533  0.058       
## Mean_Dpth_m -0.289  0.013 -0.202

Model diagnostics

plot(Chl)

qqPlot(resid(Chl))

## 1644 1902 
##  810  984

Open Water True Color

Fit the model

OWTC<-lmer(log(True_Color_PTU) ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=OWCSLAP)

summary(OWTC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(True_Color_PTU) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Year) + (1 | Sample_Month) + (1 | LakeID) + (1 |  
##     Sample_Year:LakeID)
##    Data: OWCSLAP
## 
## REML criterion at convergence: 2905
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -9.0692 -0.4274  0.0478  0.5218  3.4520 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.06706  0.2590  
##  LakeID             (Intercept) 0.18580  0.4310  
##  Sample_Month       (Intercept) 0.01609  0.1269  
##  Sample_Year        (Intercept) 0.07930  0.2816  
##  Residual                       0.13069  0.3615  
## Number of obs: 2656, groups:  
## Sample_Year:LakeID, 349; LakeID, 69; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)            1.92827    0.23703  56.49313   8.135 4.36e-11 ***
## DreissenidsUninvaded   0.40617    0.14164 146.82212   2.868  0.00474 ** 
## log(CA.SA)             0.17743    0.05636  64.59212   3.148  0.00249 ** 
## Mean_Depth_m          -0.03653    0.01476  65.70210  -2.475  0.01592 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.566              
## log(CA.SA)  -0.491  0.055       
## Mean_Dpth_m -0.266  0.011 -0.202

Model diagnostics

plot(OWTC)

qqPlot(resid(OWTC))

## 3893 1323 
## 2050  647

Open Water Total Nitrogen

Fit the model

OWTN<-lmer(log(TN_mg.L+1) ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=OWCSLAP)

summary(OWTN)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(TN_mg.L + 1) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Year) + (1 | Sample_Month) + (1 | LakeID) + (1 |  
##     Sample_Year:LakeID)
##    Data: OWCSLAP
## 
## REML criterion at convergence: -2875.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5181 -0.4198 -0.0970  0.2786 16.7221 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev.
##  Sample_Year:LakeID (Intercept) 1.662e-03 0.040762
##  LakeID             (Intercept) 8.564e-03 0.092542
##  Sample_Month       (Intercept) 1.772e-05 0.004209
##  Sample_Year        (Intercept) 6.207e-04 0.024914
##  Residual                       1.728e-02 0.131454
## Number of obs: 2685, groups:  
## Sample_Year:LakeID, 351; LakeID, 69; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            0.353394   0.044515  94.196359   7.939 4.24e-12 ***
## DreissenidsUninvaded  -0.068006   0.030759 142.438616  -2.211   0.0286 *  
## log(CA.SA)             0.023022   0.012101  65.399059   1.902   0.0615 .  
## Mean_Depth_m          -0.004547   0.003167  66.369319  -1.436   0.1557    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.656              
## log(CA.SA)  -0.564  0.059       
## Mean_Dpth_m -0.304  0.012 -0.203
plot(OWTN)

qqPlot(resid(OWTN))

## 4237  271 
## 2294  141

Secchi Depth

-Update 03/08 Model failed to converge removed log-transformation of Secchi to resolve

Fit the model

Secchi<-lmer(Secchi_Depth_m ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=noSBCSLAP)

summary(Secchi)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Secchi_Depth_m ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1 |  
##     Sample_Year) + (1 | Sample_Month) + (1 | LakeID) + (1 | Sample_Year:LakeID)
##    Data: noSBCSLAP
## 
## REML criterion at convergence: 7132.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.3068 -0.5516 -0.0576  0.4900  8.6962 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.185273 0.43043 
##  LakeID             (Intercept) 1.404778 1.18523 
##  Sample_Month       (Intercept) 0.002397 0.04896 
##  Sample_Year        (Intercept) 0.017177 0.13106 
##  Residual                       0.691860 0.83178 
## Number of obs: 2636, groups:  
## Sample_Year:LakeID, 348; LakeID, 69; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)            4.44908    0.50427 102.67491   8.823 3.10e-14 ***
## DreissenidsUninvaded  -0.49818    0.31798 242.91686  -1.567  0.11849    
## log(CA.SA)            -0.43879    0.15132  65.67386  -2.900  0.00507 ** 
## Mean_Depth_m           0.17773    0.03954  66.13573   4.496 2.87e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.597              
## log(CA.SA)  -0.610  0.047       
## Mean_Dpth_m -0.334  0.009 -0.201

Model Diagnostics

plot(Secchi)

qqPlot(resid(Secchi))

## 4432 4814 
## 2362 2553

Shoreline Bloom Chlorophyll a

-update 03/08 boundary (singular) fit Removed random effect of Sample_Year with ~0.00 variance to resolve warning.

Fit the model

SBChl<-lmer(log(ESF_Chl.a_ug.L) ~ Dreissenids + log(CA.SA) + Mean_Depth_m  + (1|Sample_Month) + (1|LakeID) , data=SBCSLAP)

summary(SBChl)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(ESF_Chl.a_ug.L) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Month) + (1 | LakeID)
##    Data: SBCSLAP
## 
## REML criterion at convergence: 1009.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.92271 -0.59622  0.08345  0.64958  2.26019 
## 
## Random effects:
##  Groups       Name        Variance Std.Dev.
##  LakeID       (Intercept) 2.1628   1.4707  
##  Sample_Month (Intercept) 0.1258   0.3546  
##  Residual                 4.3414   2.0836  
## Number of obs: 224, groups:  LakeID, 43; Sample_Month, 6
## 
## Fixed effects:
##                      Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)            6.1636     1.3187 30.0632   4.674 5.81e-05 ***
## DreissenidsUninvaded  -0.9296     0.8286 32.5716  -1.122    0.270    
## log(CA.SA)             0.3225     0.3291 37.9537   0.980    0.333    
## Mean_Depth_m          -0.1267     0.1183 33.4354  -1.071    0.292    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv -0.665              
## log(CA.SA)  -0.589  0.115       
## Mean_Dpth_m -0.546  0.120  0.003

Model diagnostics

plot(SBChl)

qqPlot(resid(SBChl))

## 1490 1096 
##  110   66

Shoreline Bloom Microcystin

-update 03/08 boundary (singular) fit Removed random effect of Sample_Month with 0.00 variance to resolve warning.

Fit the model

SBmicro<-lmer(log(ESF_Microcystin_ug.L) ~ Dreissenids + log(CA.SA) + Mean_Depth_m + (1|Sample_Year)  + (1|LakeID) + (1|Sample_Year:LakeID), data=SBCSLAP)

summary(SBmicro)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(ESF_Microcystin_ug.L) ~ Dreissenids + log(CA.SA) + Mean_Depth_m +  
##     (1 | Sample_Year) + (1 | LakeID) + (1 | Sample_Year:LakeID)
##    Data: SBCSLAP
## 
## REML criterion at convergence: 180.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.34775 -0.55174  0.05929  0.61275  1.78337 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 1.366    1.169   
##  LakeID             (Intercept) 1.174    1.084   
##  Sample_Year        (Intercept) 1.584    1.259   
##  Residual                       2.217    1.489   
## Number of obs: 46, groups:  Sample_Year:LakeID, 16; LakeID, 7; Sample_Year, 6
## 
## Fixed effects:
##                      Estimate Std. Error      df t value Pr(>|t|)
## (Intercept)            7.3562     4.4643  1.2249   1.648    0.312
## DreissenidsUninvaded   0.4430     1.7074  0.6926   0.259    0.851
## log(CA.SA)            -0.9760     2.0096  1.5301  -0.486    0.688
## Mean_Depth_m          -0.3968     0.3945  2.1521  -1.006    0.414
## 
## Correlation of Fixed Effects:
##             (Intr) DrssnU l(CA.S
## DrssndsUnnv  0.311              
## log(CA.SA)  -0.896 -0.574       
## Mean_Dpth_m -0.725 -0.187  0.468
plot(SBmicro)

qqPlot(resid(SBmicro))

## 1088 1100 
##   26   32

Mixed Effects Models for the Reduced Dataset (n=16)

Open Water Total Phosphorus

-update 03/08 Model failed to converge. Removed random effect of LakeID to ~0.00 variance to resolve warning.

Fit the model

redOWTP<-lmer(log(TP_mg.L+1) ~ Dreissenids.x  + (1|Sample_Year) + (1|Sample_Month)  + (1|Sample_Year:LakeID), data=redOWCSLAP)

summary(redOWTP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## log(TP_mg.L + 1) ~ Dreissenids.x + (1 | Sample_Year) + (1 | Sample_Month) +  
##     (1 | Sample_Year:LakeID)
##    Data: redOWCSLAP
## 
## REML criterion at convergence: -4537
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8575 -0.3194 -0.0984  0.1809  9.2298 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev. 
##  Sample_Year:LakeID (Intercept) 2.546e-05 0.0050460
##  Sample_Month       (Intercept) 3.774e-06 0.0019427
##  Sample_Year        (Intercept) 6.987e-07 0.0008359
##  Residual                       3.346e-05 0.0057840
## Number of obs: 633, groups:  
## Sample_Year:LakeID, 80; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)             0.013652   0.001268  7.336205  10.770 9.31e-06 ***
## Dreissenids.xUninvaded -0.001673   0.001223 72.882134  -1.368    0.176    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.499

Model Diagnostics

plot(redOWTP)

qqPlot(resid(redOWTP))

## 717 155 
## 343  72

Bottom Sample Total Phosphorus

-Update 03/08 boundary (singular) fit removed random effect of LakeID (variance = 0.00) to resolve warning -Update 05/15* boundary (singular) fit removed random effect of Sample Year to resolve warning

Fit the model

redBSTP<-lmer(log(TP_mg.L+1) ~ Dreissenids.x  + (1|Sample_Month)  + (1|Sample_Year:LakeID), data=redBSCSLAP)

summary(redBSTP)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(TP_mg.L + 1) ~ Dreissenids.x + (1 | Sample_Month) + (1 |  
##     Sample_Year:LakeID)
##    Data: redBSCSLAP
## 
## REML criterion at convergence: -1577.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2990 -0.3892 -0.1515  0.1008  5.9510 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.0010249 0.03201 
##  Sample_Month       (Intercept) 0.0001643 0.01282 
##  Residual                       0.0014448 0.03801 
## Number of obs: 465, groups:  Sample_Year:LakeID, 70; Sample_Month, 6
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)            4.113e-02  8.026e-03 7.482e+00   5.125  0.00111 **
## Dreissenids.xUninvaded 3.148e-05  8.594e-03 6.688e+01   0.004  0.99709   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.458

Model diagnostics

plot(redBSTP)

qqPlot(resid(redBSTP))

## 582 600 
## 222 229

Open Water Chlorophyll a

-Update 03/10 Model failed to converge fixed by adding .01 to log(Extracted_Chl.a_ug.L) instead of 1

Fit the model

redChl<-lmer(log(Extracted_Chl.a_ug.L+.01) ~ Dreissenids.x  + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=redOWCSLAP)

summary(redChl)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## log(Extracted_Chl.a_ug.L + 0.01) ~ Dreissenids.x + (1 | Sample_Year) +  
##     (1 | Sample_Month) + (1 | LakeID) + (1 | Sample_Year:LakeID)
##    Data: redOWCSLAP
## 
## REML criterion at convergence: 1311.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.0084 -0.4983  0.0557  0.5255  4.4665 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.07208  0.2685  
##  LakeID             (Intercept) 0.06533  0.2556  
##  Sample_Month       (Intercept) 0.02666  0.1633  
##  Sample_Year        (Intercept) 0.01453  0.1205  
##  Residual                       0.41063  0.6408  
## Number of obs: 619, groups:  
## Sample_Year:LakeID, 81; LakeID, 16; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)             0.75642    0.13640 16.46580   5.546 3.99e-05 ***
## Dreissenids.xUninvaded -0.03641    0.13878 16.81418  -0.262    0.796    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.529

Model diagnostics

plot(redChl)

qqPlot(resid(redChl))

## 739 705 
## 353 323

Open Water True Color

Update 03/31 Removed Sample_Month:LakeID to alleviate Convergence Code error

Fit the model

redOWTC<-lmer(log(True_Color_PTU) ~ Dreissenids.x  + (1|Sample_Year) + (1|Sample_Month) + (1|LakeID) + (1|Sample_Year:LakeID), data=redOWCSLAP)

summary(redOWTC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(True_Color_PTU) ~ Dreissenids.x + (1 | Sample_Year) + (1 |  
##     Sample_Month) + (1 | LakeID) + (1 | Sample_Year:LakeID)
##    Data: redOWCSLAP
## 
## REML criterion at convergence: 776.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -8.2627 -0.3668  0.0747  0.4767  2.6381 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.08615  0.2935  
##  LakeID             (Intercept) 0.04597  0.2144  
##  Sample_Month       (Intercept) 0.01141  0.1068  
##  Sample_Year        (Intercept) 0.12121  0.3481  
##  Residual                       0.15246  0.3905  
## Number of obs: 623, groups:  
## Sample_Year:LakeID, 81; LakeID, 16; Sample_Month, 6; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)              2.2630     0.1751  9.6432  12.924 2.09e-07 ***
## Dreissenids.xUninvaded   0.4237     0.1215 22.0556   3.488  0.00208 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.360

Model diagnostics

plot(redOWTC)

qqPlot(resid(redOWTC))

## 1075  381 
##  534  169

Open Water Total Nitrogen

-Update 03/10 Model failed to converge resolved by removing low variance factor of Sample_Month and adding .01 to log(TN_mg.L) instead of 1.0 -Update 05/15 Model failed to converge resolved by adding 1.0 to log(TN_mg.L) instead of 0.1

Fit the model

redOWTN<-lmer(log(TN_mg.L+1) ~ Dreissenids.x  + (1|Sample_Year)  + (1|LakeID) + (1|Sample_Year:LakeID), data=redOWCSLAP)

summary(redOWTN)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(TN_mg.L + 1) ~ Dreissenids.x + (1 | Sample_Year) + (1 | LakeID) +  
##     (1 | Sample_Year:LakeID)
##    Data: redOWCSLAP
## 
## REML criterion at convergence: -820.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7948 -0.4689 -0.0987  0.3629 10.6434 
## 
## Random effects:
##  Groups             Name        Variance  Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.0029898 0.05468 
##  LakeID             (Intercept) 0.0210664 0.14514 
##  Sample_Year        (Intercept) 0.0007878 0.02807 
##  Residual                       0.0124601 0.11162 
## Number of obs: 626, groups:  Sample_Year:LakeID, 81; LakeID, 16; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)             0.37732    0.04576 24.10267   8.246 1.78e-08 ***
## Dreissenids.xUninvaded -0.05624    0.04641 68.00433  -1.212     0.23    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.529

Model diagnostics

plot(redOWTN)

qqPlot(resid(redOWTN))

## 592 884 
## 268 434

Secchi Depth

Update 05/15 boundary (singular) fit resolved by removing Sample Month (variance = 0.00) Update 05/15 Model failed to converge resolved by NOT log transforming Secchi depth

Fit the Model

redSecchi<-lmer(Secchi_Depth_m ~ Dreissenids.x + (1|Sample_Year) + (1|LakeID) + (1|Sample_Year:LakeID), data=rednoSBCSLAP)

summary(redSecchi)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Secchi_Depth_m ~ Dreissenids.x + (1 | Sample_Year) + (1 | LakeID) +  
##     (1 | Sample_Year:LakeID)
##    Data: rednoSBCSLAP
## 
## REML criterion at convergence: 1732
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7937 -0.5728 -0.1050  0.4748  4.6028 
## 
## Random effects:
##  Groups             Name        Variance Std.Dev.
##  Sample_Year:LakeID (Intercept) 0.33613  0.5798  
##  LakeID             (Intercept) 0.79888  0.8938  
##  Sample_Year        (Intercept) 0.02658  0.1630  
##  Residual                       0.73189  0.8555  
## Number of obs: 622, groups:  Sample_Year:LakeID, 81; LakeID, 16; Sample_Year, 6
## 
## Fixed effects:
##                        Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)              4.4327     0.3097 21.6218  14.314 1.66e-12 ***
## Dreissenids.xUninvaded  -0.6381     0.3638 41.5168  -1.754   0.0868 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.613

Model diagnostics

plot(redSecchi)

qqPlot(resid(redSecchi))

## 1131   86 
##  557   33

Shoreline Bloom Chlorophyll a

-update 03/08 boundary (singular) fit removed random effect of Sample_Year and Sample_Year:LakeID to resolve

Fit the model

redSBChl<-lmer(log(ESF_Chl.a_ug.L) ~ Dreissenids.x  + (1|Sample_Month) + (1|LakeID), data=redSBCSLAP)

summary(redSBChl)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(ESF_Chl.a_ug.L) ~ Dreissenids.x + (1 | Sample_Month) + (1 |  
##     LakeID)
##    Data: redSBCSLAP
## 
## REML criterion at convergence: 487
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.78776 -0.50698  0.02912  0.62718  2.18332 
## 
## Random effects:
##  Groups       Name        Variance Std.Dev.
##  LakeID       (Intercept) 2.8606   1.6913  
##  Sample_Month (Intercept) 0.3031   0.5505  
##  Residual                 4.2716   2.0668  
## Number of obs: 110, groups:  LakeID, 9; Sample_Month, 6
## 
## Fixed effects:
##                        Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)              6.4371     0.8905 10.9537   7.229 1.73e-05 ***
## Dreissenids.xUninvaded  -0.8028     1.1077 15.4213  -0.725    0.479    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.633

Model diagnostics

plot(redSBChl)

qqPlot(resid(redSBChl))

## 511 319 
##  75  46

Shoreline Bloom Microcystin

-Update 03/08 boundary (singular) fit, model matrix error, and model failed to converge so removed random effect of Sample_Year:LakeID, random effect of month, and fixed effect of Mean_Depth_m to resolve

Fit the model

redMicro<-lmer(log(ESF_Microcystin_ug.L+1) ~ Dreissenids.x + (1|Sample_Year)  + (1|LakeID), data=redSBCSLAP)

summary(redMicro)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: log(ESF_Microcystin_ug.L + 1) ~ Dreissenids.x + (1 | Sample_Year) +  
##     (1 | LakeID)
##    Data: redSBCSLAP
## 
## REML criterion at convergence: 145.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2729 -0.6885  0.2355  0.6176  1.9123 
## 
## Random effects:
##  Groups      Name        Variance Std.Dev.
##  Sample_Year (Intercept) 3.3346   1.8261  
##  LakeID      (Intercept) 0.2482   0.4982  
##  Residual                2.1777   1.4757  
## Number of obs: 38, groups:  Sample_Year, 5; LakeID, 3
## 
## Fixed effects:
##                        Estimate Std. Error      df t value Pr(>|t|)
## (Intercept)             4.18486    1.00872 0.69435   4.149    0.230
## Dreissenids.xUninvaded  0.60562    0.85431 0.07754   0.709    0.881
## 
## Correlation of Fixed Effects:
##             (Intr)
## Drssnds.xUn -0.406

Model diagnostics

plot(redMicro)

qqPlot(resid(redMicro))

## 264 282 
##  21  25